package(
    default_visibility = ["//visibility:public"],
)

licenses(["notice"])

DYNAMIC_COPTS = [
    "-pthread",
    "-std=c++14",
]

cc_library(
    name = "tf_dependency",
    copts = DYNAMIC_COPTS,
    tags = ["local"],
    deps = [
        "@local_config_tf//:libtensorflow_framework",
        "@local_config_tf//:tf_header_lib",
    ],
)

cc_library(
    name = "molecule_graph_featurizer",
    srcs = [
        "molecule_graph_featurizer.cc",
    ],
    hdrs = [
        "molecule_graph_featurizer.h",
    ],
    copts = DYNAMIC_COPTS,
    deps = [
        "tf_dependency",
        "//molecule_graph_proto:molecule_graph_cc_proto",
    ],
    alwayslink = 1,
)

cc_library(
    name = "molecule_graph_parsing_ops_kernel",
    srcs = [
        "molecule_graph_parsing_ops.cc",
    ],
    copts = DYNAMIC_COPTS,
    deps = [
        "tf_dependency",
        ":molecule_graph_featurizer",
        "//molecule_graph_proto:molecule_graph_cc_proto",
    ],
    alwayslink = 1,
)

cc_binary(
    name = "molecule_graph_parsing_ops.so",
    linkshared = 1,
    deps = [":molecule_graph_parsing_ops_kernel"],
)
